
<h1>查询课程安排信息</h1>
<div id="cont">
	<div class="table-head clearfix">
		<div class="wrap left">
			<span>班级：</span>
			<select name="" id="class-select" class="class-select">
				<foreach name="class_info" item="v">
					<option value="{$v.id}" {$v['id'] == $class_id ? 'selected' : ''}>{$v.name}</option>
				</foreach>
			</select>
		</div>
		<a href="{:U('Course/addInfo')}" class="input-btn right">录入信息</a>
	</div>
	<table id="table" class="table">
		<tdead>
			<tr>
				<th>时间</th>
				<th>星期日</th>
				<th>星期一</th>
				<th>星期二</th>
				<th>星期三</th>
				<th>星期四</th>
				<th>星期五</th>
				<th>星期六</th>
			</tr>
		</tdead>
		<tbody>
			<tr>
				<td>8:00-8:40</td>
				<?php
					for($i = 0; $i <= 6; $i++) {
						echo '<td>' . getCourse($class_id, $i, 1) . '</td>';
					}
				?>
			</tr>
			<tr>
				<td>9:00-9:40</td>
				<?php
					for($i = 0; $i <= 6; $i++) {
						echo '<td>' . getCourse($class_id, $i, 2) . '</td>';
					}
				?>
			</tr>
			<tr>
				<td>10:00-10:40</td>
				<?php
					for($i = 0; $i <= 6; $i++) {
						echo '<td>' . getCourse($class_id, $i, 3) . '</td>';
					}
				?>
			</tr>
			<tr>
				<td>10:50-11:30</td>
				<?php
					for($i = 0; $i <= 6; $i++) {
						echo '<td>' . getCourse($class_id, $i, 4) . '</td>';
					}
				?>
			</tr>
			<tr>
				<td colspan="8" style="background: #ddd;height: 30px;"></td>
			</tr>
			<tr>
				<td>14:00-14:40</td>
				<?php
					for($i = 0; $i <= 6; $i++) {
						echo '<td>' . getCourse($class_id, $i, 5) . '</td>';
					}
				?>
			</tr>
			<tr>
				<td>15:00-15:40</td>
				<?php
					for($i = 0; $i <= 6; $i++) {
						echo '<td>' . getCourse($class_id, $i, 6) . '</td>';
					}
				?>
			</tr>
			<tr>
				<td>16:00-16:40</td>
				<?php
					for($i = 0; $i <= 6; $i++) {
						echo '<td>' . getCourse($class_id, $i, 7) . '</td>';
					}
				?>
			</tr>
			<tr>
				<td>16:50-17:30</td>
				<?php
					for($i = 0; $i <= 6; $i++) {
						echo '<td>' . getCourse($class_id, $i, 8) . '</td>';
					}
				?>
			</tr>
			<tr>
				<td colspan="8" style="background: #ddd;height: 30px;"></td>
			</tr>
			<tr>
				<td>19:00-19:40</td>
				<?php
					for($i = 0; $i <= 6; $i++) {
						echo '<td>' . getCourse($class_id, $i, 9) . '</td>';
					}
				?>
			</tr>
			<tr>
				<td>20:00-20:40</td>
				<?php
					for($i = 0; $i <= 6; $i++) {
						echo '<td>' . getCourse($class_id, $i, 10) . '</td>';
					}
				?>
			</tr>
			<tr>
				<td>20:50-21:30</td>
				<?php
					for($i = 0; $i <= 6; $i++) {
						echo '<td>' . getCourse($class_id, $i, 11) . '</td>';
					}
				?>
			</tr>
		</tbody>
	</table>
</div>
<script>
	$(function(){
		$('#class-select').change(function(){
			window.location.href = "{:U('Course/showList')}" + "?class_id=" + $(this).val();
		});
	});
</script>